# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=spi-tools
pkgver=1.0.1
pkgrel=0
pkgdesc="simple command line tools to help using Linux spidev devices"
url="https://github.com/cpb-/spi-tools"
arch="all !s390x !ppc64le"
license="GPL-2.0-or-later"
makedepends="autoconf automake linux-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/cpb-/spi-tools/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -fim
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
1314ba311f9034536c1879cf276b1ba6159e8f76781aaea955d04e6488327bea9da91e7e7d1075f2552f14beb3081e18daf4197dfb09c441ca29178fa731dec8  spi-tools-1.0.1.tar.gz
"
